package test;

import java.util.Scanner;

public class Version2 {

	 public static void main(String[] args){
		  Scanner in = new Scanner(System.in);
		  String str = in.nextLine();
		  String[] strs = str.split(",");
		  strs[strs.length-1]=strs[strs.length-1].replace("#", "");
		  sortString1(strs);
		  sortString2(strs);
		  for(String s:strs)
		  System.out.print(s+" ");
		  
	  }
	 private static void  sortString2(String[] strs){
		  //待续
		 
	  }
	
	 private static void  sortString1(String[] strs){
		  for(int i=0;i<strs.length;i++){
			  for(int j=i+1;j<strs.length;j++){
				  if(strs[i].compareTo(strs[j])>0){
					  String s = strs[i];
					  strs[i] = strs[j];
					  strs[j] = s;
				  }
			  }
			  
		  }
	  }
}
